package erfgame.core.graphics.renderer;

import java.util.List;
import java.util.Random;

public class RandomAnimation extends AnimatedEntityRenderer {
	private Random random;
	
	public RandomAnimation( List<AnimationFrame> frames, Random random ) {
		super( frames );
		this.random = random;
	}

	@Override
	public void start() {
		updateCurrentIndex( Math.abs( random.nextInt() ) % this.renderers.length );
		super.start();
	}
}
